A complete list of shortcuts can be accessed within RStudio using OPTION + SHIFT + K, or here.
Execution
|
Description
|
Keystroke
|
Gem
|
|
Run line or selection
|
CMD + ENTER
|
★
|
|
Run line (without moving cursor)
|
OPTION + ENTER
|
|
|
Run from beginning to line
|
CMD + OPTION + B
|
|
|
Run from line to end
|
CMD + OPTION + E
|
|
Editing
|
Description
|
Keystroke
|
Gem
|
|
Copy selection
|
CMD + C
|
|
|
Cut selection
|
CMD + X
|
|
|
Paste selection
|
CMD + V
|
|
|
Undo
|
CMD + Z
|
|
|
Comment selected lines
|
CMD + SHIFT + C
|
★
|
|
Copy selected lines
|
CMD + OPTION + ⇧ / ⇩
|
★
|
|
Move selected lines
|
OPTION + ⇧ / ⇩
|
★
|
|
Find
|
CMD + F
|
|
Selection
|
Description
|
Keystroke
|
Gem
|
|
Select all code
|
CMD + A
|
|
|
Select characters
|
SHIFT + ⇨ / ⇦
|
|
|
Select line
|
SHIFT + ⇧ / ⇩
|
|
|
Select word
|
OPTION + SHIFT + ⇨ / ⇦
|
|
Navigation
|
Description
|
Keystroke
|
Gem
|
|
Move cursor between words
|
?? + ??
|
|
|
Move cursor to end or start of line
|
?? + ??
|
|
|
Move cursor to script editor pane
|
CTRL + 1
|
★
|
|
Move cursor to console pane
|
CTRL + 2
|
★
|
Files
|
Description
|
Keystroke
|
Gem
|
|
Save file
|
CMD + S
|
|
|
Open file
|
CMD + O
|
|
|
New .R script
|
CMD + SHIFT + N
|
★
|
Misc
|
Description
|
Keystroke
|
Gem
|
|
Zoom In
|
?? + ??
|
|
|
Zoom Out
|
?? + ??
|
|
{rmarkdown}
|
Description
|
Keystroke
|
Gem
|
|
Insert an empty code chunk
|
CMD + SHIFT + I
|
★
|
|
knit a {rmarkdown} document
|
CMD + SHIFT + K
|
★
|
|
Build a {bookdown} document
|
CMD + SHIFT + B
|
|